home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d22
/
eyermv24.arc
/
MV.DOC
< prev
next >
Wrap
Text File
|
1991-04-01
|
11KB
|
238 lines
MV 2.4
A Fast File Mover
with wildcard shortcut support
and directory removal option
by
Bob Eyer
Apr 2, 1991
Syntax
------
MV SourceFile [TargetPath] [D]
SourceFile
is a filename or a filespec specifying what is to be moved. It
may be a single filename or wildcard, as well as a shortcut
such as '..\.', '.', 'C:.', or even 'C:' or a subdirectory
name.
TargetPath
is the destination where the files will be moved. Again, this
parameter supports all DOS wildcard shortcuts, such as is
supported by DOS COPY and DEL, and will detect DOS's default
path for a non-local drive, just as does COPY and DEL.
In the event that TargetPath is not mentioned, MV will assume
that the target is the local (default) directory, as does COPY.
D
an optional parameter which, if specified, will cause MV to
attempt to remove the subdirectory mentioned in SourceFile.
If D is specified, a TargetPath *must* be mentioned; otherwise,
MV will interpret D as a target subdirectory.
New:
MV 2.4 uses a copy routine which is much faster than the one used
in MV 2.0, a routine which moreover allowed a substantial
reduction in EXE size despite adding new features to the program.
The cost of these advantages, however, is higher minimum load
size. The new minimum load size (mostly for large buffers) is
42K, compared to 9K in MV 2.0.
Discussion
----------
There are many file movers in the PD/shareware market; some much
smaller than MV 2.4, others considerably larger in size and
sporting menus. However, the smallest of the genre
characteristically do not support DOS wildcard shortcuts, and only
a few of the larger ones offer consistent such support. This is
the primary reason why I wrote this little utility. I got tired
of having to type 'MOVE *.* WORK' every time I wanted to transfer
everything in the local directory to the WORK subdirectory. A
command like that should go like this: 'MV . WORK' saving, in
principle, two keystrokes, just like a COPY shortcut. I also got
tired of having to move into a subdirectory in order to transfer
them back again. I wanted it to function just like a COPY
command, so that I could say things like 'MV WORK' and get all the
files back again without having to switch directories.
MV requires video input only for confirm/no confirm on overwriting
a file and for interrupting processing, where the user wants to
break execution immediately after moving the current file. But in
both cases, console input is redirectable (so MV can be run
remotely through a communications gateway) and uses just one key
(no ENTER key). The Space Bar is used for user interrupt. Y (or
y) is used for confirm on overwrite.
The best way to check out MV is to treat it exactly like a COPY
command; there should be no difference, except for the file
renaming function of COPY: MV does not support moving a source
file to a target area with a different base name specified on the
commandline.
A short discussion of examples follows:
Suppose we have a file called ABC.EXE in directory \COMPILE and
we've been working in directory \COMPILE\ABC to compile a new
version of ABC.EXE. We now wish to update the COMPILE directory
version. MV handles the job nicely:
MV *.exe ..
This command will direct the new EXE file to be moved to the
parent directory and will result in an overwrite situation.
Hitting Y in response to the prompt will cause the overwrite. The
video display will be:
..\ABC.EXE exists. Overwrite? [Y/N]y
1 file(s) moved
Note the confirming message '1 file(s) moved'. MV always issues
either this confirmation with the number of files affected or the
message 'No file(s) moved' where no action was taken, say where
the source files are not either Archive or Reset status (i.e.
where they are Read Only, Hidden, or System).
Where the target file to be overwritten is Read Only, the attempt
to overwrite will cause no action to be taken, and there will be a
message that the target file was not deleted. The reason for this
is that, before each overwrite, MV first attempts to delete the
target file, in preparation for the new write. If it cannot, it
just returns with the appropriate diagnostic message.
Other examples
--------------
MV ABC.DOC C:LM Moves ABC.DOC to the LM subdirectory
of the default directory of C:
MV c:lm\abc.doc Moves ABC.DOC back from the LM
subdirectory of the default path of C:
(Notice that this example has no explicit
target path, and is assumed to be the
default directory.)
MV XYZ C:\ Moves XYZ to the root directory of C:
MV XYZ C: Moves XYZ to the default directory of C:
MV . ..\A Moves everything in the current directory
to the A subdirectory of the current
directory's parent.
MV . ..\..\B Moves everything in the current directory
to the B subdirectory of the current
directory's grandparent.
MV ..\..\B Moves everything in the B subdirectory
of the current directory's grandparent to
the current directory.
MV W . D Moves everything in the W subdirectory
to the current directory and then removes
the W subdirectory.
Errors
------
MV thoroughly accounts for all errors and displays each associated
with the file being operated on.
1. No parameters on the command line. In this case, MV will
return a short help screen and DOS error level of 1.
2. No files satisfying the Source filespec. MV will return the
message 'No such file(s)' and error level of 1.
3. Space bar is hit. MV responds by halting with the message
'Processing interrupted' and error level of 1.
4. Source file has the Read Only, Hidden, or System attributes.
MV takes no action, issuing a 'Check attribute' message.
5. Copy/rename operation not complete or erroneous. MV returns
the message that the source file has not been copied, proceeds
to delete any possible remnant in the target area, with a
message about no deletion if not complete, and then returns
control to the next entry.
6. MV detects duplicate in target area. See Example 1 above for
discussion.
For speed, MV moves files by renaming rather than by copying
material byte for byte, where the Source and Target specifications
do not contain any reference to drives. Where drives are
mentioned, however, MV uses straight copying of material, even
where the same drive is mentioned in the source and the target.
The speed advantage of version 2.4 relates specifically to this
copy mode.
DISCLAIMER:
==========
This program is circulated as freeware without any guarantee or
warranty; and the user, by downloading this program, or any
variant thereof or by receiving it or any of its versions in any
other form, agrees to accept full responsibility for its use. It
is therefore understood that the user accepts this program or any
previous version as is.
Bob Eyer The author may also be reached at
Compuserve [73230,2620] ROSE MEDIA 416-733-2285 (Main Conf)
Toronto CMIX 416-277-2363 (Main Conference)
Canada CANADA REMOTE 416-629-7044 (IBM Conf)
-----------------------------------------------------------------
End of documentation.
----------------end-of-author's-documentation---------------
Software Library Information:
This disk copy provided as a service of
Public (software) Library
We are not the authors of this program, nor are we associated
with the author in any way other than as a distributor of the
program in accordance with the author's terms of distribution.
Please direct shareware payments and specific questions about
this program to the author of the program, whose name appears
elsewhere in this documentation. If you have trouble getting
in touch with the author, we will do whatever we can to help
you with your questions. All programs have been tested and do
run. To report problems, please use the form that is in the
file PROBLEM.DOC on many of our disks or in other written for-
mat with screen printouts, if possible. PsL cannot debug pro-
programs over the telephone, though we can answer questions.
Disks in the PsL are updated monthly, so if you did not get
this disk directly from the PsL, you should be aware that the
files in this set may no longer be the current versions. Also,
if you got this disk from another vendor and are having prob-
lems, be aware that some files may have become corrupted or
lost by that vendor. Get a current, working disk from PsL.
For a copy of the latest monthly software library newsletter
and a list of the 3,000+ disks in the library, call or write
Public (software) Library
P.O.Box 35705 - F
Houston, TX 77235-5705
Orders only:
1-800-2424-PSL
MC/Visa/AmEx/Discover
Outside of U.S. or in Texas
or for general information,
Call 1-713-524-6394
PsL also has an outstanding
catalog for the Macintosh.